package com.zby.big_event_zby.utils;

/**
 * @version 1.0
 * @auther ZBY
 */
public class ThreadLocalUtils {
    private  static final ThreadLocal THREAD_LOCAL = new ThreadLocal() ;
    //获取键值
    public static <T> T get(){
        return (T) THREAD_LOCAL.get();
    }
    //设置键值
    public static void set(Object value){
        THREAD_LOCAL.set(value);
    }
    //清除线程变量，防止内存泄露
    public static void remove(){
        THREAD_LOCAL.remove();
    }
}
